<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>授权管理</title>
		<link type="text/css" rel="stylesheet" href="../../../resources/bootstrap/css/bootstrap.min.css"/>
		<link type="text/css" rel="stylesheet" href="../../../resources/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../../resources/jquery-easyui/themes/default/easyui.css"/>
		<link rel="stylesheet" type="text/css" href="../../../comon/css/zTreeStyle/zTreeStyle.css" />
		<link rel="stylesheet" type="text/css" href="../../../comon/css/grid.main.css"/>
		<script type="text/javascript" src="../../../comon/js/jquery/jquery.min.js"></script>
		<script type="text/javascript" src="../../../comon/js/jquery/jquery.ztree.core-3.1.js"></script>
		<script type="text/javascript" src="../../../comon/js/comon.main.js"></script>
		<script type="text/javascript" src="../../../comon/jTree/tree.main.js"></script>
		<script type="text/javascript" src="../../../comon/js/grid.main.js"></script>
		<script type="text/javascript" src="../../../resources/jquery-easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../../resources/bootstrap/js/bootstrap.min.js" charset="utf-8"></script>
		<script type="text/javascript" src="../../../resources/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="mainActivity.js"></script>
		<script type="text/javascript">
		/*创建树*/
		var param = {
			cell : {
				id : "SID",//设置构建树的id
				name : "SNAME",//树显示的名称
				parent : "SPARENT",//表示树的层级
				other : "SFID,SFNAME,SORGKINDID,SCODE,SFCODE",
				tableName : "SA_OPORG",//对应的表名
				databaseName : "system",//数据库
				rootFilter : " SPARENT is null  ",//跟节点条件,
				orderby:"SSEQUENCE asc", //排序字段
				filter:"svalidstate = '1' "
			}
		};
			var setting = {
			view : {
				selectedMulti : false, //设置是否允许同时选中多个节点。默认值: true
				autoCancelSelected : false,
				dblClickExpand : true
			},
			data : {
				simpleData : {
					enable : true
				}
			},
			async : {
				enable : true,
				url : "TreeSelectAction",
				autoParam : [ "id=currenid" ],
				type : "post"
			},
			isquickPosition : {
				enable : true, //是否有快速查询框
				url : "QuickTreeAction",
				quickCells : "SCODE,SNAME",//用于快速查询的字段
				path:"SFID"//查询路径字段
			},
			callback: {
						beforeClick: treeselected
					}
			
		};	

		</script>
	</head>
	<body onload="getData()">
		<div class="layui-fluid">
	        <div class="layui-row layui-col-space15">
	        	<div class="layui-col-md3">
					<div class="layui-card">
						<div class="layui-card-header">机构树</div>
						<div class="layui-card-body" style="height: 90%; padding: 1px;">
							<form id="main_org_trr"></form>
							<div style="width:100%; height:100%; overflow: hidden;">
								<ul id="JtreeDemo" class="ztree"></ul>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md9">
					<div class="layui-card">
						<div class="layui-card-header">角色分配</div>
						<div class="layui-card-body" style="height: 90%; padding: 1px;">
							<div component="dataGrid" id="main-grid-view"
								style="width: 100%; height: 100%; align: left;">
							</div>
						</div>
					</div>
				</div>
	        </div>
        </div>
		<script type="text/javascript">
			var Jtree = new Jtree();
			var treebody = "JtreeDemo";
			Jtree.init(treebody,setting,param);
		</script>
	</body>
</html>